1. Field of the Invention
The present invention relates to a memory system and more particularly to a memory system comprising a nonvolatile memory, such as a NAND flash memory.
2. Description of the Related Art
In recent years, as a storage device in portable electronic equipment that manipulates music data, image data, or video data, use has been made of a nonvolatile memory, such as a NAND flash memory. Pieces of portable equipment include cellular phones, digital cameras, and personal digital assistants (PDAs). Such portable equipment is usually battery-powered. For this reason, power interruption may occur, for example, during data writing due to lowering of battery power.
A nonvolatile memory, such as a NAND flash memory, has also been used in universal serial bus (USB) memory for use with a personal computer or the like. Many of the USB memories are structured so that they are readily removable from personal computers. Therefore, users may pull out the USB memory by mistake, for example, during data writing. This may cause power interruption during data writing.
Memory cell transistors that form a NAND flash memory each have a stacked gate structure in which a floating gate electrode to store charges, an intergate insulating film and a control gate electrode are stacked in this order over a semiconductor substrate with a tunnel insulating film interposed therebetween. In writing data into a memory cell transistor, charges are gradually injected into its floating gate electrode to thereby control its threshold voltage. To rewrite data in the NAND flash memory, on the other hand, new data have to be written into the memory after old data have been erased.
With the NAND flash memory having such features, the occurrence of power interruption during the injection of charges will make it impossible to write data into the memory cell transistors at the next activation time. Supposing that data is written into the same memory cell transistor, data integrity will not be obtained.
In the event of occurrence of power interruption during writing, therefore, it is required at the next activation time to prepare a new block in which data have already been erased and then copy data in the old block into the new block. Consequently, the event of rewriting data will occur frequently, which increases overhead and reduces the lifetime of the flash memory which has a limit to the number of times it can be rewritten.
As a related technique, a technique is disclosed which keeps data integrity even when forced interruption occurs while a block is being overwritten (Jpn. Pat. Appln. KOKAI Publication No. 2003-15929).